package com.xg.sys.vo;

import com.xg.frame.validate.group.AddGroup;
import com.xg.frame.validate.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author tzt
 */
@Data
@ApiModel(value = "SysUserVO对象", description = "系统用户交互对象")
public class SysUserVO {

    @NotNull(groups = UpdateGroup.class)
    @ApiModelProperty(value = "主键ID")
    private Long id;

    @NotBlank(groups = {AddGroup.class, UpdateGroup.class})
    @ApiModelProperty(value = "账号")
    private String username;

    @NotBlank(groups = {AddGroup.class, UpdateGroup.class})
    @ApiModelProperty(value = "用户名")
    private String surname;

    @Email(groups = {AddGroup.class, UpdateGroup.class})
    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "状态  100102：禁用   100101：正常")
    private String status;

    @ApiModelProperty(value = "登录失败次数")
    private Integer errNum;

    @ApiModelProperty(value = "用户锁定时间")
    private Date lockTime;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
